<?php

use yii\db\Migration;

/**
 * Handles the creation of table `archive_addon_record`.
 */
class m170320_075815_create_archive_addon_record_table extends Migration
{
    /**
     * @inheritdoc
     */
    public function safeUp()
    {
        $this->createTable('{{%archive_addon_record}}', [
            'id' => $this->integer(11)->comment('文档序号'),
            'ob_object' => $this->string(200)->comment('观察对象'),
            'ob_date' => $this->date()->comment('相关日期'),
            'ob_addr' => $this->string(200)->comment('观察地点'),
        ]);
        $this->addPrimaryKey('primaryKey','{{%archive_addon_record}}','id');
    }

    /**
     * @inheritdoc
     */
    public function safeDown()
    {
        $this->dropTable('{{%archive_addon_record}}');
    }
}
